package com.example.basedialog;

import android.os.Bundle;
import android.view.View;

import com.example.cofeed.R;

/**
 * copyright：
 *
 * @author：anthui creation date： $.
 * @since: 1.0.0$
 * @describe: $
 */
public class ExitDialog extends BaseDialog {
    @Override
    public int getMainContentViewId() {
        return R.layout.layout_exit;
    }

    @Override
    public void initData() {


    }

    @Override
    public void initComponents(Bundle savedInstanceState, View rootView) {

        if (onClickListener != null) {
            rootView.findViewById(R.id.tv_cancle).setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    dismiss();
                }
            });

            rootView.findViewById(R.id.tv_ok).setOnClickListener(onClickListener);
        }

    }

    View.OnClickListener onClickListener;

    public void setOnclick(View.OnClickListener onClickListener) {
        this.onClickListener = onClickListener;
    }
}
